<template>
  <el-select placeholder="请选择" v-model="form.channel_id">
    <el-option
      v-for="item in $store.state.ChannelsLits"
      :key="item.id"
      :label="item.name"
      :value="item.id"
    >
    </el-option>
  </el-select>
</template>

<script>
import { Channels } from '@/api/index.js'
export default {
  name: 'HmSelect',
  props: ['form'],
  data () {
    return {
      Channelslist: [],
      selectValue: ''
    }
  },
  async created () {
    if (this.$store.state.ChannelsLits.length === 0) {
      const res = await Channels()
      // this.Channelslist = res.data.channels
      this.$store.commit('setList', res.data.channels)
    }
  }
}
</script>

<style></style>
